home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1996 #1 / Amiga Plus CD - 1996 - No. 1.iso / pd / netz / xbtx_v1.1 / textdisplay.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-26  |  3.4 KB  |  108 lines

  1. /*
  2. **    $Id: TextDisplay.hpp 1.4 1995/09/26 19:45:11 olsen Exp olsen $
  3. **
  4. **    :ts=4
  5. */
  6.  
  7. /*
  8.  * Amiga changes copyright © 1995 by Olaf Barthel, All Rights Reserved
  9.  *
  10.  * Redistribution and use in source and binary forms, with or without
  11.  * modification, are permitted provided that the following conditions
  12.  * are met:
  13.  * 1. Redistributions of source code must retain the above copyright
  14.  *    notice, this list of conditions and the following disclaimer.
  15.  * 2. Redistributions in binary form must reproduce the above copyright
  16.  *    notice, this list of conditions and the following disclaimer in the
  17.  *    documentation and/or other materials provided with the distribution.
  18.  *
  19.  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
  20.  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  21.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
  22.  * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  23.  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  24.  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  25.  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  26.  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  27.  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  28.  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29.  *
  30.  * This software has not been validated by the ``Bundesamt fuer Zulassungen in
  31.  * der Telekommunikation'' of the ``Deutsche Bundepost Telekom'' and thus
  32.  * must not be used for accessing the BTX-Network of the Telekom in Germany.
  33.  *
  34.  * Diese Software hat keine Zulassung durch das Bundesamt fuer Zulassungen in
  35.  * der Telekommunikation der Deutschen Bundespost Telekom und darf daher nicht
  36.  * am Netz der Deutschen Bundespost Telekom in Deutschland betrieben werden.
  37.  */
  38.  
  39. #ifndef _TEXTDISPLAY_HPP
  40. #define _TEXTDISPLAY_HPP 1
  41.  
  42. #include "BTXDisplay.hpp"
  43.  
  44. /****************************************************************************/
  45.  
  46. #include <intuition/intuitionbase.h>
  47. #include <graphics/gfxbase.h>
  48. #include <exec/memory.h>
  49.  
  50. /****************************************************************************/
  51.  
  52. class TextDisplay : public BTXDisplay
  53. {
  54.     public:
  55.  
  56.         TextDisplay();
  57.         ~TextDisplay();
  58.  
  59.         LONG    Open(STRPTR PubScreenName,int XScale,int YScale,BOOL DirectRender);
  60.         VOID    Close(VOID);
  61.         VOID    MonitorData(int *btx_rows,int *btx_fontheight) { rows = btx_rows; };
  62.         ULONG    WaitMask(VOID);
  63.         LONG    GetChar(VOID);
  64.         LONG    Waiting(VOID);
  65.         VOID    PutLine(STRPTR Line);
  66.  
  67.         void    xputc(int c,int set,int x,int y,int xdouble,int ydouble,int underline,int diacrit,int fg,int bg);
  68.         void    xclearscreen(void);
  69.         void    xcursor(int x,int y);
  70.         void    define_raw_DRC(int c,unsigned char *data,int bits) {};
  71.         void    define_color(int index,int r,int g,int b) {};
  72.         void    define_DCLUT(int entry,int index) {};
  73.         void    define_fullrow_bg(int row,int index) {};
  74.         void    free_DRCS(void) {};
  75.         void    default_colors(void) {};
  76.  
  77.     private:
  78.  
  79.         struct Window        *Window;
  80.  
  81.         struct InputEvent     Event;
  82.  
  83.         struct MsgPort        *WindowPort;
  84.         ULONG                 WindowMask;
  85.  
  86.         WORD                 WaitingChar;
  87.  
  88.         struct RastPort     *RPort;
  89.  
  90.         UWORD                 FontWidth,
  91.                              FontHeight;
  92.         struct TextFont        *Font;
  93.  
  94.         int                    *rows;
  95.  
  96.         UWORD                 FgPen;
  97.         UWORD                 BgPen;
  98.         UWORD                 MaxPen;
  99.  
  100.         WORD                 PutIndex;
  101.  
  102.         VOID                 PutChar(UBYTE c,int x,int y);
  103.         LONG                 MapKey(struct IntuiMessage *Message);
  104.         ULONG                 FindBestModeID(Tag FirstTag,...);
  105. };
  106.  
  107. #endif    // _TEXTDISPLAY_HPP
  108.